/**
 * Group entity.
 */
package models;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.ManyToMany;
import javax.persistence.Table;

import play.data.validation.Required;
import play.data.validation.Unique;
import play.db.jpa.Model;

@Entity
@Table(name="item_group")
public class Group extends Model {
	
	public final static Integer UNDERSHIRT = 1;		//майка
	public final static Integer T_SHIRT = 2;		//футболка
	public final static Integer MUSCLE_SHIRT = 3;	//борцовка
	public final static Integer SWEAT_SHIRT = 4;	//толстовка
	public final static Integer CUP = 5;			//кружка
	public final static Integer PUZZLE = 6;			//пазл
	public final static Integer PHOTO_STONE = 7;	//фотокамень
	
	@Unique
	@Required
	public Integer groupId;

	@Required
	public String name;

	@Required
	public Integer orderPlace;

	public Integer priceS;

	public Integer priceM;

	public Integer priceL;
	
	public String image;
	
	public Group(Integer groupId, String name, Integer orderPlace, Integer priceS, Integer priceM,
			Integer priceL, String image) {
		this.groupId = groupId;
		this.name = name;
		this.orderPlace = orderPlace;
		this.priceS = priceS;
		this.priceM = priceM;
		this.priceL = priceL;
		this.image = image;
	}
	
	@Override
	public String toString() {
	
		return name;
	}
}